<!-- BEGIN campaigns -->
<table>
	<colgroup>
		<col style="width: 30%;" />
		<col style="width: 40%;" />
		<col style="width: 10%;" />
		<col style="width: 10%;" />
		<col style="width: 10%;" />
	</colgroup>
	<thead>
		<tr>
			<th>{wCOLNAME}</th>
			<th>{wCOLUSER}</th>
			<th>{wAPPS}</th>
			<th>{wEDIT}</th>
			<th>{wDELETE}</th>
		</tr>
	</thead>
	<tbody>
		<!-- BEGIN listcampaigns -->
		<tr>
			<td>{ICON} <a href="{LINK}">{LNAME}</a></td>
			<td>{LUSER}</td>
			<td>{LAPPS}</td>
			<td>{EDITROW}</td>
			<td>{DELETEROW}</td>
		</tr>
		<!-- END listcampaigns -->
	</tbody>
</table>
{DATAPAGER}
<form action="{ACTION}" method="post">
	<p><input name="new" type="submit" value="{wCREATENEW}" /></p>
</form>
<form action="{ACTION}" method="post">
	<fieldset><legend>{wEDIT}</legend>
		<p class="topbuttons">
			<input name="reset" type="reset" value="{wRESET}" />
			<input name="apply" type="submit" value="{wAPPLY}" />
			<input name="submit" type="submit" value="{wSAVE}" />
		</p>
		<p>
			<label>{wCOLNAME}:</label>
			<input name="name" id="name" type="text" value="{COLNAME}" onkeypress="setMyUrl('{COLID}', this);" onchange="setMyUrl('{COLID}', this);" />
		</p>
		<p{HIDDEN} id="urlWrap">
			<label>{wYOURURL}:</label>
			<span id="url">{YOURURL}</span>
		</p>
		<p class="bottombuttons">
			<input name="edit" type="hidden" value="{COLID}" />
			<input name="act" type="hidden" value="{ACTIONNAME}" />
			<input name="reset" type="reset" value="{wRESET}" />
			<input name="apply" type="submit" value="{wAPPLY}" />
			<input name="submit" type="submit" value="{wSAVE}" />
		</p>
	</fieldset>
</form>
<script type="text/javascript">
<!--
function setMyUrl(id, name) {
	$.get('{ADDR}data/safetext.php?text=' + name.value,
	function(data){
		$('#url').html('{WEBROOT}ipromote-' + id + '-' + data + '.xml');
	});
}
-->
</script>
<!-- END campaigns -->

